package com.leeon.container.example.queue;

import com.leeon.container.queue.QueueDemo;

import java.util.PriorityQueue;
import java.util.Random;

public class Example28 {
    public static void main(String[] agrs){
        PriorityQueue<Double> doublePQ = new PriorityQueue<Double>();
        Random random = new Random();
        for (int i = 0; i < 10; i++) {
            doublePQ.offer(random.nextDouble());
        }
        QueueDemo.printQ(doublePQ);
    }
}
